<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form name="" method="post" action="/searchConfilct.action">
		<input type="text" />
		<input type="submit" value="搜索"/>
		<s:if test="conflictList != null">
		<table border="1">
		<tr>
			<td>序号</td>
			<td>食物1</td>		
			<td>食物2</td>	
			<td>冲突类型</td>
			<td>相克结果</td>												
		</tr>
		<% int index=1; %>
		<s:iterator value="conflictList" id="conflict" status="index">
		<tr>
			<td><%=index %></td>
			<td><s:property value="#conflict.food1.name" /></td>	
				
			<td><s:property value="#conflict.food2.name" /></td>	
			<td><s:property value="#conflict.conflictType" /></td>
			<td><s:property value="#conflict.aftermath" /></td>												
		</tr>	<%index++; %>
		</s:iterator>	
		</table>
		</s:if>
		<s:else>
			没有符合条件的记录
		</s:else>
	</form>
</body>
</html>